﻿using System.IO;
using System.ServiceModel;
using System.ServiceModel.Channels;

using WcfCore;

namespace WcfServices.Proxies
{
#if (SINGLE)
	[ServiceContract(Namespace = "http://Wcf/Services", ConfigurationName = "WcfServices.Proxies.IWcfServiceProxyContract")]
#elif (PERSESSION)
	[ServiceContract(Namespace = "http://Wcf/Services", SessionMode = SessionMode.Required, ConfigurationName = "WcfServices.Proxies.IWcfServiceProxyContract")]
#elif (PERCALL)
	[ServiceContract(Namespace = "http://Wcf/Services", ConfigurationName = "WcfServices.Proxies.IWcfServiceProxyContract")]
#endif
	public interface IWcfServiceProxyContract : IWcfServiceContract, IWcfOneWayLatencyTestServiceContract
	{
#if (ISONEWAY)
		[OperationContract(IsOneWay = true, Action = "http://Wcf/Services/WcfService/Initialize")]
#else
		[OperationContract(Action = "http://Wcf/Services/WcfService/Initialize", ReplyAction = "http://Wcf/Services/WcfService/InitializeResponse")]
#endif
		void Initialize(WcfTestInput input);

#if (PORDCSF)
		[PreserveObjectReferencesDataContractSerializerFormat]
#elif (NDCSF)
		[NetDataContractSerializerFormat]
#elif (XMLSF)
		[XmlSerializerFormat]
#endif
#if (ISONEWAY)
		[OperationContract(IsOneWay = true, Action = "http://Wcf/Services/WcfService/ReceiveData")]
#else
		[OperationContract(Action = "http://Wcf/Services/WcfService/ReceiveData", ReplyAction = "http://Wcf/Services/WcfService/ReceiveDataResponse")]
#endif
		void ReceiveData(byte[] data);

#if (PORDCSF)
		[PreserveObjectReferencesDataContractSerializerFormat]
#elif (NDCSF)
		[NetDataContractSerializerFormat]
#elif (XMLSF)
		[XmlSerializerFormat]
#endif
#if (ISONEWAY)
		[OperationContract(IsOneWay = true, Action = "http://Wcf/Services/WcfService/ReceiveSC")]
#else
		[OperationContract(Action = "http://Wcf/Services/WcfService/ReceiveSC", ReplyAction = "http://Wcf/Services/WcfService/ReceiveSCResponse")]
#endif
		void ReceiveSC(SimpleContainer container);

#if (PORDCSF)
		[PreserveObjectReferencesDataContractSerializerFormat]
#elif (NDCSF)
		[NetDataContractSerializerFormat]
#elif (XMLSF)
		[XmlSerializerFormat]
#endif
#if (ISONEWAY)
		[OperationContract(IsOneWay = true, Action = "http://Wcf/Services/WcfService/ReceiveAC")]
#else
		[OperationContract(Action = "http://Wcf/Services/WcfService/ReceiveAC", ReplyAction = "http://Wcf/Services/WcfService/ReceiveACResponse")]
#endif
		void ReceiveAC(AdvancedContainer container);

#if (PORDCSF)
		[PreserveObjectReferencesDataContractSerializerFormat]
#elif (NDCSF)
		[NetDataContractSerializerFormat]
#elif (XMLSF)
		[XmlSerializerFormat]
#endif
#if (ISONEWAY)
		[OperationContract(IsOneWay = true, Action = "http://Wcf/Services/WcfService/ReceiveStream")]
#else
		[OperationContract(Action = "http://Wcf/Services/WcfService/ReceiveStream", ReplyAction = "http://Wcf/Services/WcfService/ReceiveStreamResponse")]
#endif
		void ReceiveStream(Stream data);

#if (PORDCSF)
		[PreserveObjectReferencesDataContractSerializerFormat]
#elif (NDCSF)
		[NetDataContractSerializerFormat]
#elif (XMLSF)
		[XmlSerializerFormat]
#endif
#if (ISONEWAY)
		[OperationContract(IsOneWay = true, Action = "http://Wcf/Services/WcfService/ReceiveText")]
#else
		[OperationContract(Action = "http://Wcf/Services/WcfService/ReceiveText", ReplyAction = "http://Wcf/Services/WcfService/ReceiveTextResponse")]
#endif
		void ReceiveText(string text);

#if (PORDCSF)
		[PreserveObjectReferencesDataContractSerializerFormat]
#elif (NDCSF)
		[NetDataContractSerializerFormat]
#elif (XMLSF)
		[XmlSerializerFormat]
#endif
#if (ISONEWAY)
		[OperationContract(IsOneWay = true, Action = "http://Wcf/Services/WcfService/ReceiveSTC")]
#else
		[OperationContract(Action = "http://Wcf/Services/WcfService/ReceiveSTC", ReplyAction = "http://Wcf/Services/WcfService/ReceiveSTCResponse")]
#endif
		void ReceiveSTC(SimpleTextContainer container);

#if (PORDCSF)
		[PreserveObjectReferencesDataContractSerializerFormat]
#elif (NDCSF)
		[NetDataContractSerializerFormat]
#elif (XMLSF)
		[XmlSerializerFormat]
#endif
#if (ISONEWAY)
		[OperationContract(IsOneWay = true, Action = "http://Wcf/Services/WcfService/ReceiveATC")]
#else
		[OperationContract(Action = "http://Wcf/Services/WcfService/ReceiveATC", ReplyAction = "http://Wcf/Services/WcfService/ReceiveATCResponse")]
#endif
		void ReceiveATC(AdvancedTextContainer container);

#if (ISONEWAY)
		[OperationContract(IsOneWay = true, Action = "http://Wcf/Services/WcfService/ReceiveDataThrowException")]
#else
		[OperationContract(Action = "http://Wcf/Services/WcfService/ReceiveDataThrowException", ReplyAction = "http://Wcf/Services/WcfService/ReceiveDataThrowExceptionResponse")]
#endif
		void ReceiveDataThrowException(byte[] data);

#if (ISONEWAY)
		[OperationContract(IsOneWay = true, Action = "http://Wcf/Services/WcfService/ReceiveDataTransactional")]
#else
		[OperationContract(Action = "http://Wcf/Services/WcfService/ReceiveDataTransactional", ReplyAction = "http://Wcf/Services/WcfService/ReceiveDataTransactionalResponse")]
		[TransactionFlow(TransactionFlowOption.Allowed)]
#endif
		void ReceiveDataTransactional(byte[] data);

#if (ISONEWAY)
		[OperationContract(IsOneWay = true, Action = "http://Wcf/Services/WcfService/TerminateSession")]
#else
		[OperationContract(Action = "http://Wcf/Services/WcfService/TerminateSession", ReplyAction = "http://Wcf/Services/WcfService/TerminateSessionResponse")]
#endif
		void TerminateSession();

		[OperationContract(IsOneWay=true, Action = "http://Wcf/Services/WcfService/OneWayLatencyTest")]
		void OneWayLatencyTest();
	}

	public interface IWcfServiceChannel : IWcfServiceProxyContract, IClientChannel
	{
	}

	[System.Diagnostics.DebuggerStepThrough()]
	public partial class WcfServiceProxy : ClientBase<IWcfServiceProxyContract>, IWcfServiceProxyContract
	{

		public WcfServiceProxy()
		{
		}

		public WcfServiceProxy(string endpointConfigurationName) :
			base(endpointConfigurationName)
		{
		}

		public WcfServiceProxy(string endpointConfigurationName, string remoteAddress) :
			base(endpointConfigurationName, remoteAddress)
		{
		}

		public WcfServiceProxy(string endpointConfigurationName, EndpointAddress remoteAddress) :
			base(endpointConfigurationName, remoteAddress)
		{
		}

		public WcfServiceProxy(Binding binding, EndpointAddress remoteAddress) :
			base(binding, remoteAddress)
		{
		}

		public void Initialize(WcfTestInput input)
		{
			base.Channel.Initialize(input);
		}

		public void ReceiveData(byte[] data)
		{
			base.Channel.ReceiveData(data);
		}

		public void ReceiveSC(SimpleContainer container)
		{
			base.Channel.ReceiveSC(container);
		}

		public void ReceiveAC(AdvancedContainer container)
		{
			base.Channel.ReceiveAC(container);
		}

		public void ReceiveText(string text)
		{
			base.Channel.ReceiveText(text);
		}

		public void ReceiveSTC(SimpleTextContainer container)
		{
			base.Channel.ReceiveSTC(container);
		}

		public void ReceiveATC(AdvancedTextContainer container)
		{
			base.Channel.ReceiveATC(container);
		}

		public void ReceiveStream(Stream stream)
		{
			base.Channel.ReceiveStream(stream);
		}

		public void ReceiveDataThrowException(byte[] data)
		{
			base.Channel.ReceiveDataThrowException(data);
		}

		public void ReceiveDataTransactional(byte[] data)
		{
			base.Channel.ReceiveDataTransactional(data);
		}

		public void TerminateSession()
		{
			base.Channel.TerminateSession();
		}

		public void OneWayLatencyTest()
		{
			base.Channel.OneWayLatencyTest();
		}
	}

	[ServiceContract(Namespace = "http://Wcf/Services", ConfigurationName = "WcfServices.Proxies.IWcfOneWayLatencyTestServiceProxyContract")]
	public interface IWcfOneWayLatencyTestServiceProxyContract : IWcfOneWayLatencyTestServiceContract
	{
		[OperationContract(IsOneWay=true, Action = "http://Wcf/Services/WcfOneWayLatencyTestService/OneWayLatencyTest")]
		void OneWayLatencyTest();
	}

	public interface IWcfOneWayLatencyTestServiceChannel : IWcfOneWayLatencyTestServiceProxyContract, IClientChannel
	{
	}

	[System.Diagnostics.DebuggerStepThrough()]
	public partial class WcfOneWayLatencyTestServiceProxy : ClientBase<IWcfOneWayLatencyTestServiceProxyContract>, IWcfOneWayLatencyTestServiceProxyContract
	{

		public WcfOneWayLatencyTestServiceProxy()
		{
		}

		public WcfOneWayLatencyTestServiceProxy(string endpointConfigurationName) :
			base(endpointConfigurationName)
		{
		}

		public WcfOneWayLatencyTestServiceProxy(string endpointConfigurationName, string remoteAddress) :
			base(endpointConfigurationName, remoteAddress)
		{
		}

		public WcfOneWayLatencyTestServiceProxy(string endpointConfigurationName, EndpointAddress remoteAddress) :
			base(endpointConfigurationName, remoteAddress)
		{
		}

		public WcfOneWayLatencyTestServiceProxy(Binding binding, EndpointAddress remoteAddress) :
			base(binding, remoteAddress)
		{
		}

		public void OneWayLatencyTest()
		{
			base.Channel.OneWayLatencyTest();
		}
	}
}
